import {VueOrgTree} from "../lib/index.js";
import BaseCard from "./BaseCard.vue";
import Prism from "prismjs";
import "prismjs/themes/prism.css";

export default {
    components: {
        VueOrgTree,
        BaseCard
    },
    data() {
        return {
            Prism,
            testData1: [
                {
                    name: "xxx科技有有限公司",
                    id: 1,
                    disabled: false,
                    selected: false,
                    icon: 'ios-add-circle',
                    children: [
                        {
                            id: 2,
                            name: "产品研发部产品研发部产品研发部",
                            disabled: false,
                            selected: false,
                            type: 0,
                            icon: 'http://bbs.internal.weimob.com/static/common/wiemob/avatar-12-img.jpg',
                            isRelation: true,
                            selectedCount: 10,
                            tags: [
                                {
                                    name: '5天',
                                    description: "该权限<产品研发部>有效期为 5 天",
                                    id: 100
                                }
                            ],
                            children: [
                                {
                                    id: 3,
                                    disabled: false,
                                    selected: false,
                                    name: "研发-前端",
                                    type: 0,
                                    children: [
                                        {
                                            id: 100,
                                            disabled: false,
                                            selected: false,
                                            name: "研发-前端",
                                            type: 1,
                                        },
                                        {
                                            id: 101,
                                            disabled: false,
                                            selected: false,
                                            name: "研发-后端",
                                            type: 1,
                                        },
                                        {
                                            id: 102,
                                            disabled: false,
                                            selected: false,
                                            name: "UI 设计",
                                            type: 1,
                                            children: [
                                                {
                                                    id: 1000,
                                                    disabled: false,
                                                    selected: false,
                                                    name: "研发-前端",
                                                    type: 2,
                                                },
                                                {
                                                    id: 1001,
                                                    disabled: false,
                                                    selected: false,
                                                    name: "研发-后端",
                                                    type: 2,
                                                },
                                                {
                                                    id: 1002,
                                                    disabled: false,
                                                    selected: false,
                                                    name: "UI 设计",
                                                    type: 2,
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    id: 4,
                                    disabled: false,
                                    selected: false,
                                    name: "研发-后端",
                                    type: 0,
                                },
                                {
                                    id: 5,
                                    disabled: false,
                                    selected: false,
                                    name: "UI 设计",
                                    type: 0,
                                }
                            ]
                        },
                        {
                            id: 6,
                            name: "销售部",
                            disabled: false,
                            selected: false,
                            type: 0,
                            children: [
                                {
                                    id: 7,
                                    disabled: false,
                                    selected: false,
                                    name: "销售一部"
                                },
                                {
                                    id: 8,
                                    disabled: false,
                                    selected: false,
                                    name: "销售二部"
                                }
                            ]
                        },
                        {
                            id: 9,
                            name: "销售部",
                            type: 0,
                            disabled: false,
                            selected: false,
                            children: [
                                {
                                    id: 10,
                                    name: "销售一部",
                                    disabled: false,
                                    selected: false,
                                },
                                {
                                    id: 11,
                                    name: "销售二部",
                                    disabled: false,
                                    selected: false,
                                }
                            ]
                        },
                        {
                            id: 15,
                            name: "销售部",
                            type: 0,
                            disabled: false,
                            selected: false,
                            children: [
                                {
                                    id: 16,
                                    disabled: false,
                                    selected: false,
                                    name: "销售一部"
                                },
                                {
                                    id: 17,
                                    disabled: false,
                                    selected: false,
                                    name: "销售二部"
                                }
                            ]
                        },
                        {
                            id: 24,
                            type: 0,
                            disabled: true,
                            selected: false,
                            name: "财务部"
                        }
                    ]
                }
            ],
            testData: [{
                "name": "系统管理",
                "type": 0,
                "selected": true,
                "status": 1,
                "children": [{
                    "name": "系统列表",
                    "type": 0,
                    "selected": true,
                    "status": 1,
                    "children": [{
                        "name": "系统列表页面",
                        "type": 1,
                        "selected": false,
                        "status": 1,
                        "children": [{
                            "name": "添加系统",
                            "type": 2,
                            "selected": false,
                            "status": 1,
                            "children": [],
                            "url": null,
                            "icon": null,
                        }],
                        "url": null,
                        "icon": null,
                        "path": null,
                        "resourceInfoVoList": null,
                        "relationStatus": true,
                        "relationClassId": 11003
                    }],
                    "expireType": 1,
                    "expireTime": 0,
                    "url": null,
                    "icon": null,
                    "path": null,
                    "resourceInfoVoList": null,
                    "relationStatus": false,
                    "relationClassId": 0
                }],
                "expireType": 1,
                "expireTime": 0,
                "url": "",
                "icon": "",
                "path": null,
                "resourceInfoVoList": null,
                "relationStatus": false,
                "relationClassId": 0
            }, {
                "systemId": 10002,
                "topicStyleId": 10002,
                "topicClassId": 10502,
                "mappingId": 11003,
                "parentMappingId": 0,
                "name": "权限管理",
                "type": 0,
                "redirectType": 0,
                "contentId": 11002,
                "contentCode": "#system_menu_auth_mgr",
                "selected": true,
                "status": 1,
                "children": [{
                    "systemId": 10002,
                    "topicStyleId": 10002,
                    "topicClassId": 10502,
                    "mappingId": 11005,
                    "parentMappingId": 11003,
                    "name": "角色权限",
                    "type": 0,
                    "redirectType": 1,
                    "contentId": 11004,
                    "contentCode": "#system_menu_role_auth",
                    "selected": true,
                    "status": 1,
                    "children": [{
                        "systemId": 10002,
                        "topicStyleId": 10002,
                        "topicClassId": 10502,
                        "mappingId": 104530,
                        "parentMappingId": 11005,
                        "name": "角色权限页面",
                        "type": 1,
                        "redirectType": 0,
                        "contentId": 104022,
                        "contentCode": "#system_menu_r_role_auth_p",
                        "selected": false,
                        "status": 1,
                        "children": [],
                        "expireType": 1,
                        "expireTime": 0,
                        "url": null,
                        "icon": null,
                        "path": null,
                        "resourceInfoVoList": null,
                        "relationStatus": false,
                        "relationClassId": 0
                    }],
                    "expireType": 1,
                    "expireTime": 0,
                    "url": null,
                    "icon": "https://image-c-dev.weimobwmc.com/qa-saas-wxbiz/83b0cafc9cf04c8baf35cb732b29e278.png",
                    "path": null,
                    "resourceInfoVoList": null,
                    "relationStatus": false,
                    "relationClassId": 0
                }, {
                    "systemId": 10002,
                    "topicStyleId": 10002,
                    "topicClassId": 10502,
                    "mappingId": 11503,
                    "parentMappingId": 11003,
                    "name": "账号管理",
                    "type": 0,
                    "redirectType": 1,
                    "contentId": 11502,
                    "contentCode": "#system_menu_account_mgr",
                    "selected": false,
                    "status": 0,
                    "children": [{
                        "systemId": 10002,
                        "topicStyleId": 10002,
                        "topicClassId": 10502,
                        "mappingId": 104527,
                        "parentMappingId": 11503,
                        "name": "账号管理页面",
                        "type": 1,
                        "redirectType": 0,
                        "contentId": 10006,
                        "contentCode": "#system_menu_r_account_mgr_p",
                        "selected": false,
                        "status": 1,
                        "children": [],
                        "expireType": 1,
                        "expireTime": 0,
                        "url": null,
                        "icon": null,
                        "path": null,
                        "resourceInfoVoList": null,
                        "relationStatus": false,
                        "relationClassId": 0
                    }],
                    "expireType": 1,
                    "expireTime": 0,
                    "url": null,
                    "icon": "https://image-c-dev.weimobwmc.com/qa-OmqA/6079742805e04b14a1b78c4ee3bea8d7.png",
                    "path": null,
                    "resourceInfoVoList": null,
                    "relationStatus": false,
                    "relationClassId": 0
                }, {
                    "systemId": 10002,
                    "topicStyleId": 10002,
                    "topicClassId": 10502,
                    "mappingId": 11511,
                    "parentMappingId": 11003,
                    "name": "账号权限",
                    "type": 0,
                    "redirectType": 1,
                    "contentId": 11510,
                    "contentCode": "#system_menu_account_auth",
                    "selected": true,
                    "status": 1,
                    "children": [{
                        "systemId": 10002,
                        "topicStyleId": 10002,
                        "topicClassId": 10502,
                        "mappingId": 60002,
                        "parentMappingId": 11511,
                        "name": "账号权限页面",
                        "type": 1,
                        "redirectType": 0,
                        "contentId": 48502,
                        "contentCode": "#system_menu_r_account_auth_p",
                        "selected": true,
                        "status": 1,
                        "children": [],
                        "expireType": 1,
                        "expireTime": 0,
                        "url": null,
                        "icon": null,
                        "path": null,
                        "resourceInfoVoList": null,
                        "relationStatus": true,
                        "relationClassId": 115503
                    }],
                    "expireType": 1,
                    "expireTime": 0,
                    "url": null,
                    "icon": "https://image-c-dev.weimobwmc.com/qa-saas-wxbiz/cdf7c14373424272930d99eae16297eb.png",
                    "path": null,
                    "resourceInfoVoList": null,
                    "relationStatus": false,
                    "relationClassId": 0
                }, {
                    "systemId": 10002,
                    "topicStyleId": 10002,
                    "topicClassId": 10502,
                    "mappingId": 11513,
                    "parentMappingId": 11003,
                    "name": "系统权限",
                    "type": 0,
                    "redirectType": 1,
                    "contentId": 11512,
                    "contentCode": "#system_menu_sys_auth",
                    "selected": true,
                    "status": 1,
                    "children": [{
                        "systemId": 10002,
                        "topicStyleId": 10002,
                        "topicClassId": 10502,
                        "mappingId": 40503,
                        "parentMappingId": 11513,
                        "name": "系统权限页面",
                        "type": 1,
                        "redirectType": 0,
                        "contentId": 34002,
                        "contentCode": "#system_menu_r_sys_auth_p",
                        "selected": true,
                        "status": 1,
                        "children": [],
                        "expireType": 1,
                        "expireTime": 0,
                        "url": null,
                        "icon": null,
                        "path": null,
                        "resourceInfoVoList": null,
                        "relationStatus": true,
                        "relationClassId": 115503
                    }],
                    "expireType": 1,
                    "expireTime": 0,
                    "url": null,
                    "icon": "https://image-c-dev.weimobwmc.com/qa-saas-wxbiz/83b0cafc9cf04c8baf35cb732b29e278.png",
                    "path": null,
                    "resourceInfoVoList": null,
                    "relationStatus": false,
                    "relationClassId": 0
                }, {
                    "systemId": 10002,
                    "topicStyleId": 10002,
                    "topicClassId": 10502,
                    "mappingId": 47503,
                    "parentMappingId": 11003,
                    "name": "操作日志",
                    "type": 0,
                    "redirectType": 1,
                    "contentId": 37502,
                    "contentCode": "#system_menu_op_log1",
                    "selected": true,
                    "status": 1,
                    "children": [{
                        "systemId": 10002,
                        "topicStyleId": 10002,
                        "topicClassId": 10502,
                        "mappingId": 47504,
                        "parentMappingId": 47503,
                        "name": "操作日志页面",
                        "type": 1,
                        "redirectType": 0,
                        "contentId": 37503,
                        "contentCode": "#system_menu_r_op_log_p1",
                        "selected": true,
                        "status": 1,
                        "children": [],
                        "expireType": 1,
                        "expireTime": 0,
                        "url": null,
                        "icon": null,
                        "path": null,
                        "resourceInfoVoList": null,
                        "relationStatus": true,
                        "relationClassId": 117002
                    }],
                    "expireType": 1,
                    "expireTime": 0,
                    "url": null,
                    "icon": "https://image-c-dev.weimobwmc.com/qa-OmqA/12d376e378ad406a9f7355c0632be70c.jpg",
                    "path": null,
                    "resourceInfoVoList": null,
                    "relationStatus": false,
                    "relationClassId": 0
                }],
                "expireType": 1,
                "expireTime": 0,
                "url": "",
                "icon": "",
                "path": null,
                "resourceInfoVoList": null,
                "relationStatus": false,
                "relationClassId": 0
            }, {
                "systemId": 10002,
                "topicStyleId": 10002,
                "topicClassId": 10502,
                "mappingId": 84506,
                "parentMappingId": 0,
                "name": "YQH测试的菜单请不要动",
                "type": 0,
                "redirectType": 1,
                "contentId": 83002,
                "contentCode": "#system_menu_212",
                "selected": false,
                "status": 1,
                "children": [{
                    "systemId": 10002,
                    "topicStyleId": 10002,
                    "topicClassId": 10502,
                    "mappingId": 109502,
                    "parentMappingId": 84506,
                    "name": "资源配置",
                    "type": 1,
                    "redirectType": 0,
                    "contentId": 108002,
                    "contentCode": "#system_menu_r_page",
                    "selected": false,
                    "status": 1,
                    "children": [],
                    "expireType": 1,
                    "expireTime": 0,
                    "url": null,
                    "icon": null,
                    "path": null,
                    "resourceInfoVoList": null,
                    "relationStatus": true,
                    "relationClassId": 11003
                }],
                "expireType": 0,
                "expireTime": 5,
                "url": "",
                "icon": "https://image-c-dev.weimobwmc.com/qa-OmqA/7d1b9cc573044a0da56512cb993b140a.jpg",
                "path": null,
                "resourceInfoVoList": null,
                "relationStatus": false,
                "relationClassId": 0
            }, {
                "systemId": 10002,
                "topicStyleId": 10002,
                "topicClassId": 10502,
                "mappingId": 99008,
                "parentMappingId": 0,
                "name": "YQH添加的同级菜单",
                "type": 0,
                "redirectType": 0,
                "contentId": 98003,
                "contentCode": "#system_menu_code0100",
                "selected": true,
                "status": 1,
                "children": [],
                "expireType": 1,
                "expireTime": 0,
                "url": "",
                "icon": "ios-add-circle",
                "path": null,
                "resourceInfoVoList": null,
                "relationStatus": false,
                "relationClassId": 0
            }]
        };
    }
};
